package com.zlc.workflow.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum TaskActionEnum {

    SUBMIT("SUBMIT","下一步"),
    REJECT("REJECT","驳回"),
    SAVE("SAVE","保存"),
    TERMINATION("TERMINATION","终止"),
    TRANSFER("TRANSFER","转办"),
    ADD_ACTOR("ADD_ACTOR","加签")
    ;

    private String type;
    private String desc;

    public static TaskActionEnum  getType(String type){
        TaskActionEnum[] types = values();
        for(TaskActionEnum nodeType : types){
            if(nodeType.type.equals(type)){
                return nodeType;
            }
        }
        return null;
    }
}
